import { Link, Outlet } from 'umi';
import { ConfigProvider, theme } from 'antd';
import styles from './index.less';
import { useEffect } from 'react';

export default function Layout() {

  useEffect(() => {
    
    const script = document.createElement('script');
    script.src = 'http://publicjs.supmiao.com/live2dcubismcore.min.js'
    // script.async = true;
    document.body.appendChild(script);

    return () => {
      document.body.removeChild(script);
    }
  },[])

  return (
    <ConfigProvider
      // theme={{
      //   algorithm: theme.darkAlgorithm,
      // }}
    >
      <div className={styles.navs}>
        <Outlet />
      </div>
    </ConfigProvider>
  );
}
